XENO_CONFIG := /usr/xenomai/bin/xeno-config
CFLAGS := $(shell $(XENO_CONFIG) --skin alchemy --cflags)
LDFLAGS := $(shell $(XENO_CONFIG) --skin alchemy --ldflags)
INCFLAGS = -I/opt/etherlab/include
LLDFLAGS = -L/opt/etherlab/lib -lethercat_rtdm 
CC := $(shell $(XENO_CONFIG) --cc)

EXECUTABLE :=servo

all: $(EXECUTABLE)

%: %.c
	$(CC) -o $@ $< $(INCFLAGS) $(CFLAGS) $(LLDFLAGS) $(LDFLAGS) -lm
